package com.jrx.anytxn.transaction.timer.job.queryLoanStatus.step;

import com.jrx.anytxn.transaction.bean.LoanSaveBean;
import com.jrx.anytxn.transaction.handler.ILoanHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.item.ItemWriter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 放款查询writer
 */
@Service
public class QueryLoanStatusWriter implements ItemWriter<LoanSaveBean> {

    private static final Logger logger = LoggerFactory.getLogger(QueryLoanStatusWriter.class);

    @Autowired
    private ILoanHandler iLoanHandler;

    @Override
    public void write(List items) {
        iLoanHandler.saveOrUpdateLoan(items);
    }

}
